package com.yqy.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;


/**
 * @author yiqianyi
 * @date 2022/3/16 16:30
 * @deprecated 用于配置swagger配置类
 */
@Configuration
public class SwaggerConfig {
    @Bean
    public Docket docket(){
        Docket docket = new Docket(DocumentationType.SWAGGER_2);
        ApiInfo apiInfo = new ApiInfoBuilder().contact(new Contact("lzq","http://www.baidu.com","2645922971@qq.com"))
                .title("yiqianyi-Api-学生管理系统")
                .description("yiqianyi-Api-Swagger-description")
                .version("1.0")
                .build();
        docket.apiInfo(apiInfo);
        return docket;
    }
    private ApiInfo apiInfo() {
        return new ApiInfoBuilder()
                .title("springcloudproducer_RESTful APIs")
                .description("服务名：springcloudproducer")
                .version("1.0")
                .build();
    }
}
